$OpenBSD: patch-configure,v 1.7 2017/02/10 09:40:01 giovanni Exp $
--- configure.orig	Wed Jan 18 03:18:46 2017
+++ configure	Fri Feb 10 10:31:16 2017
@@ -18878,6 +18878,7 @@ fi
 	LIBS="$saveLIBS"
 	HAVE_AUTHPGSQL=1
 	CFLAGS="$PGSQL_CFLAGS $CFLAGS"
+	CPPFLAGS="$PGSQL_CFLAGS $CPPFLAGS"
 	LIBAUTHPGSQL="libauthpgsql.la"
 fi
 
@@ -19641,7 +19642,7 @@ then
 	$COURIERCONFIG >conftest.out || exit 1
 	sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
 	. ./conftest2.out
-	rm -f conftest.out conftest2.out
+	rm -f ./conftest.out ./conftest2.out
 
 	cmailuser="$mailuser"
 	cmailgroup="$mailgroup"
@@ -19653,7 +19654,7 @@ then
 	$bindir/courierauthconfig --configfiles >conftest.out || exit 1
 	sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
 	. ./conftest2.out
-	rm -f conftest.out conftest2.out
+	rm -f ./conftest.out ./conftest2.out
 
 	cmailuser="$mailuser"
 	cmailgroup="$mailgroup"
